//
//  TestEdge.m
//  LogicSim
//
//  Created by Jeremy Pereira on 11/04/2012.
//  Copyright (c) 2012 Jeremy Pereira. All rights reserved.
//

#import "TestEdge.h"
#import "LGSEdge.h"

@implementation TestEdge

-(void) testCreatePattern
{
    NSMutableArray* array = [[NSMutableArray alloc] init];
    for (int i = 0 ; i < 32 ; ++i)
    {
        [array addObject: [[LGSEdge alloc] init]];
    }
    [LGSEdge setArray: array 
           from32Bits: 0x12345678 
        affectedNodes: nil];
    uint32_t result = [LGSEdge make32BitNumberFromEdgeArray: array];
    STAssertTrue(result == 0x12345678, 
                 @"Incorrect result %08x", 
                 (unsigned int) result);
}

@end
